package com.woniu.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.user.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 资源表 Mapper 接口
 * </p>
 *
 * @author ly
 * @since 2024年12月05日
 */
@Mapper
public interface PermissionMapper extends BaseMapper<Permission> {

    List<Permission> selectResourceByUserId(@Param("adminId") Integer adminId, @Param("parentId") Integer parentId);

    List<String> selectButtonByUserId(@Param("userId")String userId,@Param("parentId") Integer menuId);

    Set<String> selectPermissions(@Param("adminId") String adminId);

    List<String> selectButtonByAdminId(@Param("adminId") String adminId,@Param("menuId") Integer menuId);

    Set<String> selectPermissionsUser(@Param("userId") String userId);
}
